#include <iostream>
#include <string>

using namespace std;

class car
{
    public:
        //无参数构造函数
        car() : car_sign("G12345"),car_color("red"),car_type("taxi"),car_price(25.1),car_load(0.55){}
        //有参数构造函数
        car(string car_sign,string car_color,string car_type,float car_price,float car_load)
        {
            this->car_sign = car_sign;
            this->car_color = car_color;
            this->car_type = car_type;
            this->car_price = car_price;
            this->car_load = car_load;
        }
        //拷贝构造函数
        car(const car &t) {
            this->car_sign = t.car_sign;
            this->car_color = t.car_color;
            this->car_type = t.car_type;
            this->car_price = t.car_price;
            this->car_load = t.car_load;
        }
        //析构函数
        ~car() {} 
        //成员函数
        void setsign(string car_sign);
        string getsign() const;
        void setcolor(string car_color);
        string getcolor() const;
        void settype(string car_type);
        string gettype() const;
        void setprice(float car_price);
        float getprice() const;
        void setload(float car_load);
        float getload() const;
        //输出车的具体属性
        void show();

    private:
        //数据成员
        string car_sign;//车牌号
        string car_color;//车的颜色
        string car_type;//车的类型
        float car_price;//车的价格 ，单位(万元)
        float car_load;//车的载重，单位(吨)
};

void car::setsign(string car_sign)
{
    this->car_sign = car_sign;
}

string car::getsign() const
{
    return car_sign;
}

void car::setcolor(string car_color)
{
    this->car_color = car_color;
}

string car::getcolor() const
{
    return car_color;
}

void car::settype(string car_type)
{
    this->car_type = car_type;
}

string car::gettype() const
{
    return car_type;
}

void car::setprice(float car_price)
{
    this->car_price = car_price;
}

float car::getprice() const
{
    return car_price;
}

void car::setload(float car_load)
{
    this->car_load = car_load;
}

float car::getload() const
{
    return car_load;
}

void car::show()
{   cout << "车牌号 : "<< car_sign <<endl;
    cout << "车的颜色 : " << car_color <<endl;
    cout << "车的类型 : " << car_type <<endl;
    cout << "车的价格 : " << car_price << "(万元)" <<endl;
    cout << "车的载重 : " << car_load << "(吨)" <<endl;
}

int main(){
    car a;    
    car a1("T12306","yello","train",1000.0,200.0);
    car a2=a;
    car a3=a1;
    cout<<"a的数据成员"<<endl;
    a.show();
    cout<<"a1的数据成员"<<endl;
    a1.show();
    cout<<"a2的数据成员"<<endl;
    a2.show();
    cout<<"a3的数据成员"<<endl;
    a3.show();
    return 0;
}